#ifndef _TRANSACTION_H
#define _TRANSACTION_H
#include <stdint.h>
#include <list>





typedef struct {
	uint16_t id;
	uint8_t repeat;
}Session;

static std::list<Session>  AllSession;

void registerSession(uint16_t id)
{
	Session newSession;
	newSession.id  = id;
	newSession.repeat  = 0;
	AllSession.push_back(newSession);
}



void respSessionRegister(uint16_t id)
{
	std::list<Session>::iterator iter  = AllSession.begin();
	for (; iter != AllSession.end(); iter++) {
		if (iter->id == id) {
			AllSession.erase(iter);
			break;
		}
	}
}




#endif
